package com.spring.property.test;

import com.spring.property.model.Student;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * 每一行代码，都是改变世界的力量
 *
 * @author 郭帅
 * @date 2021/11/1 11:21 下午
 */
@ComponentScan(basePackages = "com.spring.property")
public class Main {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(Main.class);
        Student student = (Student) context.getBean("student");
        System.out.println(student.getName());
    }

}
